#include <iostream>
#include <fstream>
#include <string>
#include <cstring>
#include <stdlib.h>
#include "policy.h"
#include "nm.h"

using namespace std;

static char** interfaces;

int sine_policyModelController(int appID);

/*
int main()
{
	int n = sine_policyModelController(31);
//	std::cout<<"--> "<<n<<std::endl;

	for(int i=0;i<=n-1;i++)
	{
		std::cout<<interfaces[i]<<std::endl;
	}
}*/
int sine_policyModelController(int appID)
{
	int sockfd=0;
	sockfd = 0;//sine_getsockfdCM(appID);
	interfaces = (char**)malloc(100 *sizeof(char*));
	for(int i=0; i<100; i++)
	{
	   *(interfaces+i) = (char*)malloc(3 *sizeof(char));
	}

	int n=polModel(interfaces, appID, sockfd);
	return n;
}

void policyListenerController()
{
	int appID=31;
//	int appID=sine_getappIDCM();
//	cout << "Controller Called From Listener\n";
	sine_policyModelController(appID);
}
